<?php get_header(); ?>
<?php $searchPageId = 315;?>
<section class="vertu-header generic-header loaded" style="opacity: 1;">
  <h2 style="margin-top:5%; margin-bottom:30px; font-size:32px;">美丽誓颜护肤</h2>
  <p style="font-size:18px;">留住女人青春，成就她们美丽的梦想，让每一个人都微笑面对生活</p>
</section>
<section class="generic-container help-container loaded" style="opacity: 1;">
  <fieldset class="legend-title telephone-times" style="border:0;">
    <!-- <div class="row"><p class="number"></p></div>     -->
    <form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
      <label>搜索代理：</label>
      <input class="searchText" id="s" name="s" type="text" placeholder="请输入名字或微信号">
      <input name="cat" type="text" value="1" style="display:none;"/>
      <input id="search" type="submit" class="searchBtn" value="" />
    </form>
    <?php 
      $s = (get_query_var('s')) ? get_query_var('s') : '';
    ?>
      
      <ul class="searchList">
        <?php 
        if (have_posts()) {
          while ($wp_query->have_posts()) {
            $wp_query->the_post(); 
            $title = get_post($post->ID)->post_title;
            $content = get_post($post->ID)->post_content;
        ?>
          <li><span class="name">姓名<i><?php echo $title; ?></i></span><span class="account">微信<i><?php echo $content; ?></i></span></li>
        <?php   
          }
        }else{ 
        ?>
        <h4>没有搜索到相关信息</h4>
        <?php 
          }
        ?>
      </ul>
      <div class="case_bottom">
        <?php 
          $big = 99999; // 需要一个不可能有这么大的页数
          $wp_query->query_vars['paged'] > 1 ?$current=$wp_query->query_vars['paged'] :$current= 1;  
          $args = array(
            'base' => @add_query_arg('paged','%#%'),
            'format' => '',
            'current' => $current,
            'total' => $wp_query->max_num_pages,
            'end_size' => 10 ,//最多显示多少个页码
            'show_all'=>false,
            'mid_size'=>2,
            'prev_next'    => True,
            'prev_text'    => "<",
            'next_text'    => ">",
            'type'         => 'plain'
          );
          echo paginate_links($args); 
        ?> 
      </div>
  </fieldset>
</section>
<?php get_footer(); ?>
